package com.zttek.photosShareProject.common.json;

import com.zttek.photosShareProject.modules.model.User;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Y
 * Date: 2017-08-28
 * Time: 16:10
 */
public class UserVO implements VO {

    private Long userId;
    private String userName;
    private Integer gender;
    private ImageVO userLogo;
    private boolean stared = false;

    public UserVO() {
    }

    public UserVO(User user, ImageVO userLogo) {
        this(user, userLogo, false);
    }

    public UserVO(User user, ImageVO userLogo, boolean star) {
        userId = user.getId();
        userName = user.getUsername();
        gender = user.getSex();
        this.userLogo = userLogo;
        stared = star;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public ImageVO getUserLogo() {
        return userLogo;
    }

    public void setUserLogo(ImageVO userLogo) {
        this.userLogo = userLogo;
    }

    public boolean isStared() {
        return stared;
    }

    public void setStared(boolean stared) {
        this.stared = stared;
    }

    public static class GetListForm{
        private Integer pageNum;
        private Integer pageSize;
        private String orderByField;
        private Long userId;
        private boolean ascend;

        public Integer getPageNum() {
            return pageNum;
        }

        public void setPageNum(Integer pageNum) {
            this.pageNum = pageNum;
        }

        public Integer getPageSize() {
            return pageSize;
        }

        public void setPageSize(Integer pageSize) {
            this.pageSize = pageSize;
        }

        public String getOrderByField() {
            return orderByField;
        }

        public void setOrderByField(String orderByField) {
            this.orderByField = orderByField;
        }

        public Long getUserId() {
            return userId;
        }

        public void setUserId(Long userId) {
            this.userId = userId;
        }

        public boolean isAscend() {
            return ascend;
        }

        public void setAscend(boolean ascend) {
            this.ascend = ascend;
        }
    }

    public static class RelevanceForm {

        private Long targetId;
        private Long userId;
        private boolean direction;

        public Long getTargetId() {
            return targetId;
        }

        public void setTargetId(Long targetId) {
            this.targetId = targetId;
        }

        public Long getUserId() {
            return userId;
        }

        public void setUserId(Long userId) {
            this.userId = userId;
        }

        public boolean isDirection() {
            return direction;
        }

        public void setDirection(boolean direction) {
            this.direction = direction;
        }
    }

    public static class SearchForm{

        private Integer pageNum;
        private Integer pageSize;
        private String q;
        private Long userId;

        public Integer getPageNum() {
            return pageNum;
        }

        public void setPageNum(Integer pageNum) {
            this.pageNum = pageNum;
        }

        public Integer getPageSize() {
            return pageSize;
        }

        public void setPageSize(Integer pageSize) {
            this.pageSize = pageSize;
        }

        public String getQ() {
            return q;
        }

        public void setQ(String q) {
            this.q = q;
        }

        public Long getUserId() {
            return userId;
        }

        public void setUserId(Long userId) {
            this.userId = userId;
        }
    }
}
